/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.system.action.system;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.system.mapper.system.PersonalFileMapper;
public class PersonalFile extends BaseAction
{
    @Autowired(required=false)
	private PersonalFileMapper mapper;
    /**
    个人文件
    */
    
    public Map personalFile() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        
        
        tb = createTreeBean("s_tree_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> s_tree=mapper.s_tree(params);
        s_tree = s_tree.buildTree(tb,tb.getPid());
        result.put("s_tree", s_tree);
        
        return result;
    }
    /**
    文件列表
    */
    
    public Map personalFileList() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("CMID9",-1);
        SQLList<SQLMap> s_folder=mapper.s_folder(params);
        result.put("s_folder", s_folder);
        
        
        params.def("CMID9",-1);
        params.def("CMID9",-1);
        SQLList<SQLMap> p_file=mapper.p_file(params,pagination);
        p_file.setPagedListInfo(pagination);
        result.put("p_file", p_file);
        
        
        params.def("CMID9",-1);
        SQLList<SQLMap> s_tree_menu=mapper.s_tree_menu(params);
        result.put("s_tree_menu", s_tree_menu);
        
        return result;
    }
    /**
    文件版本
    */
    
    public Map personalFileVersion() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_file_version=mapper.s_file_version(params);
        result.put("s_file_version", s_file_version);
        
        return result;
    }
    /**
    增加版本
    */
    
    public Map personalFileAddVersion() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_file=mapper.s_file(params);
        SQLMap s_file_emt=s_file.getExistfirst();
        result.put("s_file", s_file_emt);
        
        return result;
    }
    /**
    搜索文件
    */
    
    public Map personalFileSearch() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        result.put("s_search", pagination.getSearchParas());
        
        
        Object aCM =mapper.aCM(params);
        result.put("aCM", aCM);
        
        
        params.def("CMID9",-1);
        SQLList<SQLMap> s_tree_menu=mapper.s_tree_menu(params);
        result.put("s_tree_menu", s_tree_menu);
        
        
        
        
        
        
        
        
        SQLList<SQLMap> s_project_files=mapper.s_project_files(params,pagination);
        s_project_files.setPagedListInfo(pagination);
        result.put("s_project_files", s_project_files);
        
        
        
        
        
        return result;
    }
    /**
    */
    
    public Map d_file() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int d_file = mapper.d_file(params);
        result.put("d_file", d_file);
        
        return result;
    }
    /**
    */
    
    public Map d_version() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int d_version = mapper.d_version(params);
        result.put("d_version", d_version);
        
        return result;
    }
    /**
    新文件夹修改
    */
    
    public Map personalFileFolderSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int i_folder = mapper.i_folder(params);
        result.put("i_folder", i_folder);
        
        return result;
    }
}